package com.systop.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.systop.domain.to.OrderTo;
import com.systop.domain.vo.GoodsSalesVo;
import com.systop.domain.vo.OrderConfirmVo;
import com.systop.domain.vo.OrderSubmitResponseVo;
import com.systop.domain.vo.OrderSubmitVo;
import com.systop.domain.vo.SumSalesVo;
import com.systop.entity.Consignee;
import com.systop.entity.Goods;
import com.systop.entity.Order;
import com.systop.entity.SysUser;

import java.util.List;
import java.util.concurrent.ExecutionException;

public interface OrderService extends IService<Order> {
    //查询订单数据
    public List<Order> findAllOrders(Order order);
    //查询符合条件的订单总数
    public int countOrders(Order order);
    //查询所有用户名,返回到下拉框
    public List<SysUser> findAllUser();
    //查询所有收货人，前台根据相关用户名显示对应收货人
    public List<Consignee> findAllConsignee();
    //查询所有商品
    public List<Goods> findAllGoods();

    //根据商品id查询单价和规格
    public Goods findPriceById(Order order);
    //添加订单
    public int addOrder(Order order);

    //删除订单
    public int delOrder(Order order);

    List<OrderTo> queryMyOrderList(SysUser user) throws ExecutionException, InterruptedException;

    OrderConfirmVo confirmOrder() throws ExecutionException, InterruptedException;

    OrderSubmitResponseVo submitOrder(OrderSubmitVo orderSubmitVo);

    void closeOrder(List<Order> orderList);

    List<SumSalesVo> querySalesGroupByMonth(String year,String month);

    List<GoodsSalesVo> querySalesDetail(String year, String month);
}
